﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="Dispose.aspx.cs" Inherits="HHWeb.SystemManage.DownCores.Dispose" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>后台管理-<%=Command=="Add"?"添加":"修改" %>下载中心</title>
<link href="../../Css/backCommon.css" rel="stylesheet" type="text/css" />
<script src="../../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" name="Command" id="Command" value="<%=Command %>" />
    <input  type="hidden" name="DownCoreClassName" id="DownCoreClassName" value="<%=DownCoreClassName %>" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="30px" background="../../images/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12px" height="30px"><img src="../../images/tab_03.gif" width="12px" height="30px"/></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><div align="center"><img src="../../images/tb.gif" width="16px" height="16px" /></div></td>
                <td width="95%" class="STYLE1"><span class="STYLE3">你当前的位置</span>：[下载中心]-[<%=Command == "Add" ? "添加" : "修改"%>下载中心]</td>
              </tr>
            </table></td>
            <td width="54%">&nbsp;</td>
          </tr>
        </table></td>
        <td width="16px"><img src="../../images/tab_07.gif" width="16px" height="30px" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8px" background="../../images/tab_12.gif">&nbsp;</td>
        <td>
    <%--Submit数据区头--%>
    <table id="EditArea" border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr><td><span><font color="red">*</font>文件编号：</span></td><td><input type="text" id="DownCodeNumber" name="DownCodeNumber" class="TextCommon" readonly="readonly" style="width:147px;" value="<%=DownCodeNumber %>"/></td></tr>
    <tr><td><span><font color="red">*</font>文件名称：</span></td><td><input type="text" id="FileName" name="FileName" class="TextCommon" style="width:147px;" value="<%=FileName %>"/></td></tr>
    <tr><td><span><font color="red">*</font>下载中心类别：</span></td><td>
    <select id="DownCoreClassID" name="DownCoreClassID" class="Common">
    <option value="0">----请选择下载中心类别----</option>
    <%=DownCoreClass%>
    </select>
    </td></tr>
    <tr><td><span><font color="red">*</font>文件路径：</span></td><td>
    <input type="file" id="File" name="File" runat="server" onkeydown="event.returnValue=false;" onpaste="return flase"/>
    <input type="hidden" id="HDFileUrl" name="HDFileUrl" value="<%=FileUrl %>" />
    (文件格式：".doc"，".docx"，".xls"，".pdf"，".wps")
    </td></tr>
    <tr><td><span>文件内容：</span></td><td>
        <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath="~/FCKeditor/" Height="300px">
        </FCKeditorV2:FCKeditor>
    </td></tr>
        <tr><td><span>发布时间：</span></td><td><input type="text" id="PublishTime" name="PublishTime" readonly="readonly" class="TextCommon" onfocus="new WdatePicker(this,'%Y-%M-%D %h:%m:%s',true)" style="width:147px;"  value="<%=PublishTime %>"/></td></tr>
    <tr><td><span>文件来源：</span></td><td><input type="text" id="FileSource" class="TextCommon" name="FileSource" style="width:147px;"  value="<%=FileSource %>"/></td></tr>
    <tr><td><span><font color="red">*</font>点击量：</span></td><td><input type="text" id="ClickRate" class="TextCommon" readonly="readonly" name="ClickRate" onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')"  onpaste="return false;" oncontextmenu="return false" oncopy="return false" oncut="return false" style="width:147px;"  value="<%=ClickRate %>"/></td></tr>
    <tr><td><span><font color="red">*</font>下载量：</span></td><td><input type="text" id="DownRate" readonly="readonly" class="TextCommon" name="DownRate" onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')"  onpaste="return false;" oncontextmenu="return false" oncopy="return false" oncut="return false" style="width:147px;"  value="<%=DownRate %>"/></td></tr>
    <tr><td><span>是否需要下载码：</span></td><td>
    <input type="radio" id="IfNeed1" name="IfNeed" value="1" <%=IfNeed==1?"checked=checked":"" %>/>是
    <input type="radio" id="IfNeed0" name="IfNeed" value="0" <%=IfNeed==0?"checked=checked":"" %>/>否
    </td></tr>
    <tr><td><span><font color="red">*</font>排序号：</span></td><td><input type="text" id="Sort" name="Sort" class="TextCommon" style="width:147px;" onKeyUp="value=value.replace(/\D/g,'')" onafterpaste="value=value.replace(/\D/g,'')"  onpaste="return false;" oncontextmenu="return false" oncopy="return false" oncut="return false" value="<%=Sort %>"/></td></tr>
    <tr><td><span>状态：</span></td><td> 
    <input type="radio" id="Status1" name="Status" class="Common" value="1" <%=Status==1?"checked=checked":"" %>/>启用
    <input type="radio" id="Status0" name="Status" class="Common" value="0" <%=Status==0?"checked=checked":"" %>/>禁用
    </td></tr>
    <tr><td><span>创建人：</span></td><td><input type="text" id="Creater" name="Creater" class="TextCommon" style="width:147px;" readonly="readonly"  value="<%=Creater %>"/></td></tr>
    <tr><td><span>创建时间：</span></td><td><input type="text" id="CreateTime" name="CreateTime"  class="TextCommon" style="width:147px;" readonly="readonly" value="<%=CreateTime %>"/></td></tr>
    <tr><td>&nbsp;</td><td><input type="button" id="BTSubmit" name="BTSubmit"  class="Common" value="确定" /><input type="button"  id="BTCancel" name="BTCancel" class="Common" value="取消"/></td></tr>
    </table>
     <%--Submit数据区尾--%>
        </td>
        <td width="8px" background="../../images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="35px" background="../../images/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12px" height="35px"><img src="../../images/tab_18.gif" width="12px" height="35px" /></td>
        <td>
        <%--分页区头--%>
        <%--分页去尾--%>
        </td>
        <td width="16px"><img src="../../images/tab_20.gif" width="16px" height="35px" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
<%--Jquery验证区Start--%>
    <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../../JS/FormCommon.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#BTSubmit").click(function () {
                if ($("#DownCodeNumber").val() == null || $("#DownCodeNumber").val() == "") {
                    alert("文件编号不能为空！");
                    $("#DownCodeNumber").focus();
                    return;
                }
                if ($("#FileName").val() == null || $("#FileName").val() == "") {
                    alert("文件名称不能为空！");
                    $("#FileName").focus();
                    return;
                }
                if ($("#DownCoreClassID :selected").val() == 0) {
                    alert("请选择下载中心类别！");
                    return;
                }
                var com = '<%=Command %>'
                if (com == "Add") {
                    if ($("#File").val() == null || $("#File").val() == "") {
                        alert("文件路径不能为空！");
                        return;
                    }
                }
                if ($("#DownRate").val() == null || $("#DownRate").val() == "") {
                    alert("下载量不能为空！");
                    $("#DownRate").focus();
                    return;
                }
                if ($("#Sort").val() == null || $("#Sort").val() == "") {
                    alert("排序号不能为空！");
                    $("#Sort").focus();
                    return;
                }
                $("#form1").attr("method", "POST");
                $("#form1").submit();
            })
            $("#DownCoreClassID").change(function () {
                $("#DownCoreClassName").val($("#DownCoreClassID :selected").html());
            })
            var DownCoreClassID = "<%=DownCoreClassID %>";
            if (DownCoreClassID != null && DownCoreClassID != null) {
                $("#DownCoreClassID").val(DownCoreClassID);
            }
        })        
    </script>
<%--Jquery验证区End--%>
</body>
</html>
